import type { UserInfo } from '@/types';
import { defineStore } from 'pinia';
import { ref } from 'vue';

export const useLoginStore = defineStore('login-info', () => {
	const userInfo = ref<UserInfo>();

	function setUserInfo(newUserInfo: UserInfo) {
		userInfo.value = newUserInfo;
	};

	return {
		userInfo,
		setUserInfo
	}
}, {
	persist: true
});
